// 微任务队列
microQueue = []

// 宏任务队列
macroQueue = [
]

console.log('script start');

setTimeout(function setTimeout1() {
  console.log('setTimeout');
}, 0);

Promise.resolve().then(function then1() {
  console.log('promise1');
}).then(function then2() {
  console.log('promise2');
});
console.log('script end');

function a() {
    console.log('函数a');
}

function b() {
    a();
    console.log('函数b');
}
b();

/**
 * script start
 * script end
 * promise1
 * promise2
 * setTimeout
 */